summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeltermann <>2023-08-10 11:06:44 +0200
committerzeltermann <>2023-08-10 19:07:12 +0200
commit1ed9e8812b78503a4ee07e6d23be3265c935a458 (patch)
tree5495deaf1767866bcfb618110c9ddf65570b2e3f
parentMerge pull request #11093 from liamwhite/result-ergonomics (diff)
downloadyuzu-1ed9e8812b78503a4ee07e6d23be3265c935a458.tar
yuzu-1ed9e8812b78503a4ee07e6d23be3265c935a458.tar.gz
yuzu-1ed9e8812b78503a4ee07e6d23be3265c935a458.tar.bz2
yuzu-1ed9e8812b78503a4ee07e6d23be3265c935a458.tar.lz
yuzu-1ed9e8812b78503a4ee07e6d23be3265c935a458.tar.xz
yuzu-1ed9e8812b78503a4ee07e6d23be3265c935a458.tar.zst
yuzu-1ed9e8812b78503a4ee07e6d23be3265c935a458.zip
-rw-r--r--src/yuzu/game_list.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp
index 465084fea..b5a02700d 100644
--- a/src/yuzu/game_list.cpp
+++ b/src/yuzu/game_list.cpp
@@ -214,13 +214,17 @@ void GameList::OnTextChanged(const QString& new_text) {
const int children_count = folder->rowCount();
for (int j = 0; j < children_count; ++j) {
++children_total;
+
const QStandardItem* child = folder->child(j, 0);
+
+ const auto program_id = child->data(GameListItemPath::ProgramIdRole).toULongLong();
+
const QString file_path =
child->data(GameListItemPath::FullPathRole).toString().toLower();
const QString file_title =
child->data(GameListItemPath::TitleRole).toString().toLower();
const QString file_program_id =
- child->data(GameListItemPath::ProgramIdRole).toString().toLower();
+ QStringLiteral("%1").arg(program_id, 16, 16, QLatin1Char{'0'});
// Only items which filename in combination with its title contains all words
// that are in the searchfield will be visible in the gamelist
@@ -231,7 +235,7 @@ void GameList::OnTextChanged(const QString& new_text) {
file_path.mid(file_path.lastIndexOf(QLatin1Char{'/'}) + 1) + QLatin1Char{' '} +
file_title;
if (ContainsAllWords(file_name, edit_filter_text) ||
- (file_program_id.count() == 16 && edit_filter_text.contains(file_program_id))) {
+ (file_program_id.count() == 16 && file_program_id.contains(edit_filter_text))) {
tree_view->setRowHidden(j, folder_index, false);
++result_count;
} else {